﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Stats = BomberManServer.Gaming.Object.Stats;

namespace BomberManServer.Gaming.Object.Stats.MeleeMatch
{
    class MeleeGameStats: Stats.GameStats
    {
        public MeleeGameStats(Match match) : base(match) { }

        public override Int16 getScore(UInt16 team_id)
        {
            return teamStats[team_id].players[0].getScore(); ;
        }

        public override UInt16 getWinnerID()
        {
            Int16 score = 0;
            UInt16 id = 0;

            foreach (TeamStats teams in teamStats)
                foreach (PlayerStats player in teams.players)
                    if (player.getScore() > score)
                    {
                        score = player.getScore();
                        id = teams.teamID;
                    }

            return id;
        }
    }
}
